import request from '@/utils/request'

// 查询命令步骤列表
export function listStep(query) {
  return request({
    url: '/kong/step/list',
    method: 'get',
    params: query
  })
}

// 查询命令步骤详细
export function getStep(gid) {
  return request({
    url: '/kong/step/' + gid,
    method: 'get'
  })
}
// 查询命令集合所有步骤
export function getCmdSetAllStep(gid) {
  return request({
    url: '/kong/step/getCmdSetGid/' + gid,
    method: 'get'
  })
}

// 新增命令步骤
export function addStep(data) {
  return request({
    url: '/kong/step',
    method: 'post',
    data: data
  })
}

// 新增命令步骤
export function addStepAll(data) {
  return request({
    url: '/kong/step/saveAll',
    method: 'post',
    data: data
  })
}

// 修改命令步骤
export function updateStep(data) {
  return request({
    url: '/kong/step',
    method: 'put',
    data: data
  })
}

// 删除命令步骤
export function delStep(gid) {
  return request({
    url: '/kong/step/' + gid,
    method: 'delete'
  })
}
